home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1980-05-16 | 2.9 KB | 52 lines |
- '*********************BOB WHO???????????-By Mark Wickson**********************
- Rem After you have loaded the Bobs in the usual way(See elsewhere for
- Rem details of loading files),you have to use the "Get Bob Palette"
- Rem command to make sure they are the colours you defined them.
- Rem next we place the Bob of our choice on screen,you can
- Rem have upto 64 bobs on screen.
- Rem The first number after the word Bob is the Bob number,this is
- Rem important if you're going to have more than one Bob on screen at
- Rem a time,this is so you can have several objects on screen at a time
- Rem but make each one do different things-So each Bob you have on screen
- Rem must have a different number-Its easiest to increase the number by 1
- Rem for every new Bob.so if you were going to use Bob 1 you'd write:
- Rem Bob 1,
- Rem The next number is the Bobs horizontal position on the current screen,
- Rem so for this current screen the number can be anything between 0 and
- Rem 320-If you wanted to put it on the right hand side,you'd set it around
- Rem 300,if you wanted it to be on the left hand side,you'd set it around
- Rem 20,and the centre is roughly 150-But you can put it any where within
- Rem these limits,lets imagine we want it in the centre,so we type:
- Rem Bob 1,150,
- Rem The next number is the vertical position of the Bob on the current
- Rem screen,so for this current screen the number can be anything between
- Rem 0 and 256-If you want it near the top,you'd set it around 10,if you
- Rem wanted it in the centre,110 is approximately right,and the bottom of
- Rem the screen would be around 230,but as above,you're free to set it
- Rem anywhere within the limits of the screen.Like this:
- Rem Bob 1,150,110,
- Rem The final number is the IMAGE number of the Bob,don't confuse this
- Rem with the Bob number-This is what affects the visual aspect of the
- Rem Bob-Not the Bob itself(In the Sprite/Bob bank maker,you aren't actually
- Rem defining the Bobs as such,but the images that ANY of them can have)
- Rem If you have created 10 images in your Bob bank and want to use
- Rem the first image for the first Bob,you'd write:
- Rem Bob 1,150,110,1
- Rem But if you wanted Bob 1 to use the fifth image in the bank,you'd write:
- Rem Bob 1,150,110,5
- Rem So you can use any image number that you want with any Bob-You can even
- Rem have several different Bobs with the same image number.
- Rem In our example we use the "Wait Vbl" command which makes AMOS wait until
- Rem the screen has `drawn' itself before progressing-Because our program is so
- Rem small if you took that instruction the Bob wouldn't even appear-You
- Rem don't have to include this command in larger programs or ones that have
- Rem commands after the "Bob" command.
- Screen Open 0,320,256,16,Lowres
- Flash Off
- Curs Off
- Cls 0
- Load "ATTBG:JUMP.Abk"
- Get Bob Palette
- Bob 1,150,110,1
- Wait Vbl
- Rem "AMOS 1.3" owners should change "Get Bob palette" to "Get Sprite Palette".